import {axios} from "../utils/request";
import global from "../store/global";

const api = global.serverAddress;


export function loginByLoginFormAPI(loginDto) {
    return axios({
        url: `${api}/login`,
        method: "POST",
        data: loginDto,
    });
}

export function logOutAPI() {
    return axios({
        url: `${api}/logout`,
        method: "GET",
    });
}

export function getOneCaptchaAPI() {
    return axios({
        url: `${api}/get_one_captcha`,
        method: "GET",
        responseType: "blob"
    });
}

